package
{
	import flash.display.Sprite;
	import flash.events.Event;
  
	public class Line extends Sprite
	{
		private var k:Boolean=false;
		private var  oLine:Line;
		private var oMain:Main=new Main()
		private var oCuboid:Object=oMain.oCuboid
		public function Line()
		{
		  init()	
		}
		private function init():void
		{
	       var 	 bullet:Sprite=new Sprite()
			   bullet.graphics.lineStyle(2,0xff0000)
			   bullet.graphics.moveTo(0,0)
			   bullet.graphics.lineTo(0,60)
			   bullet.graphics.endFill()
			  addChild(bullet)
		}
		
	private function createLine():void
		{
			if(k)
			{
				oLine=new Line()
				oLine.x=oCuboid.x+Math.floor(Math.random()*oCuboid.width)
				oLine.y=oCuboid.y-oCuboid.height
				addChild(oLine)
				stage.addEventListener(Event.ENTER_FRAME,lineStart)
			}
		}
	
		private function lineStart(e:Event):void
		{
			oLine.y-=12
		}

	}
}